package com.shameit.goodqrinfomanager.source.http;


import com.shameit.goodqrinfomanager.bean.litepal.CangKu;
import com.shameit.goodqrinfomanager.bean.litepal.CangWei;
import com.shameit.goodqrinfomanager.bean.litepal.ChanPin;
import com.shameit.goodqrinfomanager.bean.litepal.JingXiaoShang;
import com.shameit.goodqrinfomanager.bean.litepal.LoginUser;

import java.util.ArrayList;
import java.util.List;

import io.reactivex.Observable;
import me.goldze.mvvmhabit.http.BaseResponse;
import okhttp3.RequestBody;
import retrofit2.http.Body;
import retrofit2.http.Field;
import retrofit2.http.FieldMap;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.HEAD;
import retrofit2.http.Header;
import retrofit2.http.Headers;
import retrofit2.http.POST;
import retrofit2.http.Url;


public interface ApiService {
    public final static String bindUrl = "/qrcode/api/binding";
    public final static String rebindUrl = "/qrcode/api/rebinding";
    public final static String unbindUrl = "/qrcode/api/remove_binding";
    public final static String checkQrInfo = "/qrcode/api/bindinfo";
    public final static String queryvillage = "/qrcode/api/queryUserVillage";
    public final static String querybuilding = "/qrcode/api/queryUserBuilding";
    public final static String queryuser = "/qrcode/api/queryUserInfoByAddrCodeId";
    public final static String getbindinfo = "/qrcode/api/bindinfoByUser";
    public final static String login = "/qrcode/api/appLogin";
    public final static String testBaseUrl = "http://qrcode.hzrq.com";

    public final static String syncCangku = "/api/apps/synWarehouseInfo";
    public final static String syncCangwei = "/api/apps/synPositionsInfo";
    public final static String syncChanpin = "/api/apps/synProductInfo";
    public final static String syncJinxiaoshang = "/api/apps/synCustomerInfo";
    public final static String uploadbar = "/api/apps/relevanceCode";



    @POST(login)
    Observable<BaseResponse<LoginUser>> login(@Body RequestBody body);

    @POST(syncCangku)
    @Headers({"token:eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhdWQiOiJ3ZWIiLCJpc3MiOiJ5dW5qaS1wbHVzIiwiZXhwIjoxNjAyMjU3MDA4LCJpYXQiOjE2MDIyMTM4MDgsImp0aSI6IjAyMzRjNDcyZWE4MTRmZTg4ODBjYWZkMDdhMTVmYzFiIiwidXNlcm5hbWUiOiJhZG1pbiJ9.z5OLkq7sSK_8Gdf9EEXusINNaIhrHxkltUQAm5_xeQ0"})
    Observable<BaseResponse<List<CangKu>>> syncCangku(@Body RequestBody body);

    @POST(syncCangwei)
    @Headers({"token:eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhdWQiOiJ3ZWIiLCJpc3MiOiJ5dW5qaS1wbHVzIiwiZXhwIjoxNjAyMjU3MDA4LCJpYXQiOjE2MDIyMTM4MDgsImp0aSI6IjAyMzRjNDcyZWE4MTRmZTg4ODBjYWZkMDdhMTVmYzFiIiwidXNlcm5hbWUiOiJhZG1pbiJ9.z5OLkq7sSK_8Gdf9EEXusINNaIhrHxkltUQAm5_xeQ0"})
    Observable<BaseResponse<List<CangWei>>> syncCangwei();

    @POST(syncChanpin)
    @Headers({"token:eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhdWQiOiJ3ZWIiLCJpc3MiOiJ5dW5qaS1wbHVzIiwiZXhwIjoxNjAyMjU3MDA4LCJpYXQiOjE2MDIyMTM4MDgsImp0aSI6IjAyMzRjNDcyZWE4MTRmZTg4ODBjYWZkMDdhMTVmYzFiIiwidXNlcm5hbWUiOiJhZG1pbiJ9.z5OLkq7sSK_8Gdf9EEXusINNaIhrHxkltUQAm5_xeQ0"})
    Observable<BaseResponse<List<ChanPin>>> syncChanpin();

    @POST(uploadbar)
    @Headers({"token:eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhdWQiOiJ3ZWIiLCJpc3MiOiJ5dW5qaS1wbHVzIiwiZXhwIjoxNjAyMjU3MDA4LCJpYXQiOjE2MDIyMTM4MDgsImp0aSI6IjAyMzRjNDcyZWE4MTRmZTg4ODBjYWZkMDdhMTVmYzFiIiwidXNlcm5hbWUiOiJhZG1pbiJ9.z5OLkq7sSK_8Gdf9EEXusINNaIhrHxkltUQAm5_xeQ0"})
    Observable<BaseResponse<Boolean>> uploadBarBind(@Body RequestBody body);

    @POST(syncJinxiaoshang)
    @Headers({"token:eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhdWQiOiJ3ZWIiLCJpc3MiOiJ5dW5qaS1wbHVzIiwiZXhwIjoxNjAyMjU3MDA4LCJpYXQiOjE2MDIyMTM4MDgsImp0aSI6IjAyMzRjNDcyZWE4MTRmZTg4ODBjYWZkMDdhMTVmYzFiIiwidXNlcm5hbWUiOiJhZG1pbiJ9.z5OLkq7sSK_8Gdf9EEXusINNaIhrHxkltUQAm5_xeQ0"})
    Observable<BaseResponse<List<JingXiaoShang>>> syncJinxiaoshang();
}
